﻿using System;
using System.Drawing;
using System.Runtime.InteropServices;

namespace CXW.Core.Sharp
{
    internal partial class Login : BaseForm
    {
        [DllImport("User32.DLL")]
        public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
        [DllImport("User32.DLL")]
        public static extern bool ReleaseCapture();
        public const uint WM_SYSCOMMAND = 0x0112;
        public const int SC_MOVE = 61456;
        public const int HTCAPTION = 2;
        public Login()
        {
            InitializeComponent();

            this.MouseDown += delegate { ReleaseCapture(); SendMessage(Handle, WM_SYSCOMMAND, SC_MOVE | HTCAPTION, 0); };
            this.labMESSAGE.Text = "";
            this.txtUSERID.Text = "";
            this.txtPWD.Text = "";
        }
    }
}
